File

fun File(path: Path, mimeType: MimeType? = null, name: String? = null): File
fun File(path: Path, mimeType: MimeType? = null, name: String? = null): File

Creates a new instance of File based on the given path.

Since

8.0.0

Parameters

path

The file path.

mimeType

MIME type of the file content. If not passed, Chromium will automatically determine the type based on the file extension. If no MIME type is associated with the extension, the content type defaults to application/octet-stream.

name

The file name.


fun File(bytes: ByteArray, mimeType: MimeType? = null, name: String? = null): File
fun File(bytes: ByteArray, mimeType: MimeType? = null, name: String? = null): File

Creates a new instance of File based on the given bytes array.

Since

8.0.0

Parameters

bytes

The file content.

mimeType

MIME type of the file content.

name

The file name.


fun File(): File
fun File(): File

Creates an empty File.

Since

8.0.0